<include file="Public/head" />
    <div class="tableContainer">
        <div class="tablePanel">
            <div class="navInfo">
                <div class="title">
                    <span class="title-icon14"></span>
                    <div><span>&nbsp;&nbsp;<{$module_name_zh}>列表</span></div>
                </div>
                <form method="get" action="<{:U('')}>">
                    <input type="hidden" name="m" value="<{:MODULE_NAME}>" />
                    <input type="hidden" name="c" value="<{:CONTROLLER_NAME}>" />
                    <input type="hidden" name="a" value="<{:ACTION_NAME}>" />
                    <div class="searchWrapper">
                        <input type="button" class="button addBtn" value="添加<{$module_name_zh}>" onclick="location.href='<{:U('save',array('type'=>I('type')))}>'">
                    </div>
                </form>
            </div>
            <div class="tableContent">
                <div class="list0">
                    <table cellspacing="0" cellpadding="0">
                        <thead>
                            <tr class="thWrapper">
                                <th class="titleFirst"></th><th width="250">广告<{:I('type')=='1'?'图片':'文字'}></th>
                                <th class="sepTh"><div></div></th><th>外链</th>
                                <th class="sepTh"><div></div></th><th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <foreach name="list" item="vo">
                                <tr class="tdWrapper">
                                    <td></td>
                                    <if condition="I('type')=='1'">
                                        <td style="padding:5px 0 0 5px;"><img src="<{:C('IMG_PREFIX').$vo['pic']}>" width="200" max-height="60" /></td>
                                    <else />
                                        <td><{$vo.pic}></td>
                                    </if>
                                    <td class="sepTd"></td><td title="<{$vo.url}>"><{$vo.url}></td>
                                    <td class="sepTd"></td>
                                    <td>
                                        <a href="<{:U('save',array('id'=>$vo['id'],'type'=>I('type')))}>">编辑</a>
                                        &nbsp;|&nbsp;
                                        <a href="javascript:void(0);" onclick="delRow('<{$vo.id}>',this)" id="delBtn<{$vo.id}>">删除</a>
                                    </td>
                                </tr>
                            </foreach>
                        </tbody>
                    </table>
                </div>
                <!-- 分页 -->
                <div class="page-list">
                    <div class="page-list"><{$page}></div>
                </div>
            </div>
        </div>
    </div>
    <script>
        function delRow(id,obj){
            if(confirm('确定要删除吗？')){
                $.post("<{:U('del')}>",{id:id},function(res){
                    if(res.status == 1){
                        note_info(res.info,obj);
                        setTimeout('location.reload()',1200);
                    }else{
                        note_info(res.info,obj,'warn');
                    }
                },'json');
            }
        }
    </script>
<include file="Public/foot" />